Ruby on Rails - rails installation on ubuntu in ruby on rails - ruby on rails tutorial - rails guides - rails tutorial - ruby rails



On a clean ubuntu, installation of Rails should be straight forward Upgrading ubuntu packages

sudo apt-get update
sudo apt-get upgrade
Clicking "Copy Code" button will copy the code into the clipboard - memory. Please paste(Ctrl+V) it in your destination. The code will get pasted. Happy coding from Wikitechy - ruby on rails tutorial - rails guides - ruby rails - rubyonrails - learn ruby on rails - team

Install Ruby and Rails dependecies

sudo apt-get install git-core curl zlib1g-dev build-essential libssl-dev libreadline-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev libcurl4-openssl-dev python-software-properties libffi-dev
Clicking "Copy Code" button will copy the code into the clipboard - memory. Please paste(Ctrl+V) it in your destination. The code will get pasted. Happy coding from Wikitechy - ruby on rails tutorial - rails guides - ruby rails - rubyonrails - learn ruby on rails - team

Installing ruby version manager. In this case the easy one is using rbenv

git clone https://github.com/rbenv/rbenv.git ~/.rbenv
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc
echo 'eval "$(rbenv init -)"' >> ~/.bashrc
Clicking "Copy Code" button will copy the code into the clipboard - memory. Please paste(Ctrl+V) it in your destination. The code will get pasted. Happy coding from Wikitechy - ruby on rails tutorial - rails guides - ruby rails - rubyonrails - learn ruby on rails - team

Installing Ruby Build

git clone https://github.com/rbenv/ruby-build.git ~/.rbenv/plugins/ruby-build
echo 'export PATH="$HOME/.rbenv/plugins/ruby-build/bin:$PATH"' >> ~/.bashrc
Clicking "Copy Code" button will copy the code into the clipboard - memory. Please paste(Ctrl+V) it in your destination. The code will get pasted. Happy coding from Wikitechy - ruby on rails tutorial - rails guides - ruby rails - rubyonrails - learn ruby on rails - team

Restart Shell

exec $SHELL
Clicking "Copy Code" button will copy the code into the clipboard - memory. Please paste(Ctrl+V) it in your destination. The code will get pasted. Happy coding from Wikitechy - ruby on rails tutorial - rails guides - ruby rails - rubyonrails - learn ruby on rails - team

Install ruby

rbenv install 2.3.1
rbenv global 2.3.1
rbenv rehash
Clicking "Copy Code" button will copy the code into the clipboard - memory. Please paste(Ctrl+V) it in your destination. The code will get pasted. Happy coding from Wikitechy - ruby on rails tutorial - rails guides - ruby rails - rubyonrails - learn ruby on rails - team

Installing rails

gem install rails
Clicking "Copy Code" button will copy the code into the clipboard - memory. Please paste(Ctrl+V) it in your destination. The code will get pasted. Happy coding from Wikitechy - ruby on rails tutorial - rails guides - ruby rails - rubyonrails - learn ruby on rails - team

Installing Rails on Windows

Step 1: Installing Ruby

We need Ruby programming language installed. We can use a precompiled version of Ruby called RubyInstaller

  • Download and run Ruby Installer from rubyinstaller.org
  • Run the installer. Check "Add Ruby executables to your PATH", then install.
  • To access Ruby, go to the Windows menu, click All Programs, scroll down to Ruby, and click “Start Command Prompt with Ruby”. A command prompt terminal will open. If you type ruby -v and press Enter, you should see the Ruby version number that you inst

Step 2: Ruby Development Kit

After installing Ruby, we can try to install Rails. But some of the libraries Rails depends on need some build tools in order to be compiled, and Windows lacks those tools by default. You can identify this if you see an error while attempting to install Rails Gem::InstallError: The ‘[gem name]’ native gem requires installed build tools. To fix this, we need to install the Ruby Development Kit.

  • Download the DevKit
  • Run the installer.
  • We need to specify a folder where we’re going to permanently install the DevKit. I recommend installing it in the root of your hard drive, at C:\RubyDevKit. (Don’t use spaces in the directory name.)

Now we need to make the DevKit tools available to Ruby.

  • In your command prompt, change to the DevKit directory. cd C:\RubyDevKit or whatever directory you installed it in.
  • We need to run a Ruby script to initialize the DevKit setup. Type ruby dk.rb init. Now we’ll tell that same script to add the DevKit to our Ruby installation. Type ruby dk.rb install.

The DevKit should now be available for your Ruby tools to use when installing new libraries.

Step 3: Rails

Now we can install Rails. Rails comes as a Ruby gem. In your command prompt, type: gem install rails Once you press Enter, the gem program will download and install that version of the Rails gem, along with all the other gems Rails depends on.

Step 4: Node.js

Some libraries that Rails depends on require a JavaScript runtime to be installed. Let’s install Node.js so that those libraries work properly.

  • Download the Node.js installer from here.
  • When the download completes, visit your downloads folder, and run the node-v4.4.7.pkg installer.
  • Read the full license agreement, accept the terms, and click Next through the rest of the wizard, leaving everything at the default.
  • A window may pop up asking if you want to allow the app to make changes to your computer. Click “Yes”.
  • When the installation is complete, you’ll need to restart your computer so Rails can access Node.js.

Once your computer restarts, don’t forget to go to the Windows menu, click “All Programs”, scroll down to Ruby, and click “Start Command Prompt with Ruby”.


This ruby on rails tutorial page provides you the following key areas such as ruby , rail , ruby on rails , rail forum , ruby on rails tutorial , ruby tutorial , rails guides , rails tutorial , learn ruby , rails form_for , ruby rails , ruby class , what is ruby on rails , rails installer , ruby online , learn ruby on rails , ruby on rails jobs , rails find_by , install rails , easyrail , rubyonrails , link_to rails , ruby on rails developer , learn ruby the hard way , railscasts , ruby on rails examples , ruby on rails vs php , rails 4 , rails activerecord , rails generate , ruby and rails , ruby on rails download , install ruby on rails , ruby net http , what is rails , ruby app , ruby vs ruby on rails , ruby on rails windows , rails for zombies , ruby on rails book , ruby on rails development , ruby on rails ide , ruby on rails tutorial pdf

Related Searches to rails installation on ubuntu in ruby on rails